<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>省市联动</title>
    <script src="../../lib/layui/layui.js" charset="utf-8"></script>
    <script src="../../static/js/app.js"></script>
    <script src="../../lib/xm-select/xm-select.js"></script>
    <link rel="stylesheet" href="../../static/css/font.css">
<link rel="stylesheet" href="../../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../../static/css/weadmin.css">

</head>
<body>
<div class="layui-upload">
    <div class="layui-upload-drag" id="test10">
        <i class="layui-icon"></i>
        <p>点击上传，或拖拽到此处</p>
    </div>
</div>
<script>
    layui.use('upload', function(){
        var $ = layui.jquery,upload = layui.upload;
        //拖拽上传
        upload.render({
            elem: '#test10'
            ,url: global.api_url + "/easyExcel/demoUpload"
            ,headers:{content_type: "application/json;charset=UTF-8",Authorization:getUser().token}
            ,accept: 'file' //普通文件
            ,done: function(res){
                layer.msg('上传成功');
                console.log(res)
            }
        });
    })
</script>
</body>
</html>